# demo_one/urls.py
from django.urls import path
from demo_one.views import base_view
from demo_one.views.grades_view import GradeListView
from demo_one.views.stu_views import StudentListView
from demo_one.views.asset_views import AssentListView

urlpatterns = [
    path('', base_view.base, name='base'),  # 访问到127.0.0.1:8000，会跳转到base.html页面
    path('grades/', GradeListView.as_view(), name='grade_list'),  # 获取班级列表(在grades_view中)
    path('students/', StudentListView.as_view(), name='student_list'),  # 获取学生列表(在stu_views中)
    path('assets/', AssentListView.as_view(), name='asset_list'),  # 获取资产列表(在asset_views中)

    # 局部内容接口（在页面中点击，触发局部路由，访问到对应的页面）
    path('student/list/', base_view.student_list, name='student_list'),
    path('class/list/', base_view.class_list, name='class_list'),
    path('asset/list/', base_view.asset_list, name='asset_list'),
    path('waiting/', base_view.waiting_page, name='waiting_page'),

]
